<!DOCTYPE html>
<html lang="en" >
<head >
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>首页</title>
    <style>
    </style>
</head>
<!-- js事件 -->
<!-- <body  onload="printLoadFinish()">
    <button onclick="document.getElementById('p1').innerHTML=Date()">现在的时间是？</button>
    <button onclick="this.innerHTML=Date()">现在的时间是？</button>
    <button onclick="getNowTime()">现在的时间是？</button>
    改变内容事件：<input type="text" onchange="changeContentEffect()">
    键盘按键事件：<input type="text" onkeydown="popUpWindowAppears()">
    <p id="p1"></p>
    <p id="p2"></p>
    <p style="border: 1px solid red;width:200px;height:200px;" onmouseover="printMouseOver()" onmouseout="console.log('mouseout1');console.log('mouseout2')"></p>
    
    <div id="outer" style="border: 1px solid green;width:200px;height:200px;background-color: rgba(250,0,255,0.1);">
        outer
        <div id="inner" style="border: 1px solid blue;width:100px;height:100px; background-color: rgba(0,255,255,0.2);">inner</div>
    </div>
    

    <script>
        function getNowTime(){
            document.getElementById("p2").innerHTML=Date();
        }
        function changeContentEffect(){
            console.log(event.target.value);
        }
        function printMouseOver(){
            console.log("mouseover");
        }
        function popUpWindowAppears(){
            if(event.keyCode == 13 || event.keyCode == 101){
                alert("回车或5");
            }
        }
        function printLoadFinish(){
            console.log("loadFinish——body");
        }
        window.onload=function(){
            console.log("loadFinish——window")
        };
        const  outer = document.getElementById("outer");
        const  inner = document.getElementById("inner");
        outer.addEventListener("selectstart",function(){
            event.returnValue = false;
        })
        inner.addEventListener("selectstart",function(){
            event.stopPropagation();
        })
    </script>
</body> -->
</html>